/**
 * 用户公共数据
 */
export default {
  state: {

  },
  mutations: {
    /**
     * 退出登录
     */
    logout() {
      uni.removeStorageSync("userId");
      uni.removeStorageSync("username");
      uni.removeStorageSync("role");
      uni.removeStorageSync("company");
      uni.removeStorageSync("department");
      uni.removeStorageSync("mobile");
      uni.removeStorageSync("gender");
      uni.removeStorageSync("birthday");
      uni.redirectTo({
        url: '/pages/login/login'
      })
    },
    returnToHome() {
      uni.navigateTo({
        url: '/pages/index/index'
      })
    }
  }
}